/* 
 * File:   main.c
 * Author: abhi
 *
 * Created on February 7, 2012, 10:59 AM
 */

#include <stdio.h>
#include <stdlib.h>
#include "nfa.h"
#define MAX_LINE_LEN 100

/*
 * 
 */
int main(int argc, char** argv) {
    
    char* inputStr;
    NFA* inputNFA;
    NextClosureStates* inputNFANextClosureStates;
    int maxStrLen = MAX_LINE_LEN;
    
    inputNFA = createNFA();
    
    printf("Enter String to Parse:\n");
    
    fscanf(stdin,"[^\n]\n",inputStr);
    
    inputNFANextClosureStates = createNextClosureForStates(inputNFA);
    
    if (checkIfStringInLanguage(inputNFA, inputNFANextClosureStates, inputStr)) {
        printf("\n Given string is accepted\n");
    } else {
        printf("\n Given string is not accepted\n");
    }

    return (EXIT_SUCCESS);
}




